<script setup>
import ColumnChart from './components/ColumnChart.vue'
import CircularDiagram from './components/CircularDiagram.vue'
import LineGraph from './components/LineGraph.vue'
import PieChart from './components/PieChart.vue'
import { createPDF } from '@/hooks/files/pdf/useDownLoad'
const rowCol = ref(12)

const onClick = () => {
  createPDF(document.getElementById('print')).toPdf('统计分析.pdf')
}
</script>

<template>
  <div class="flex justify-end pr-3">
    <el-button type="primary" @click.stop="onClick">下载</el-button></div
  >
  <div id="print">
    <el-row :gutter="30">
      <el-col :span="rowCol">
        <ContentWrap class="w-1/1"> <ColumnChart /> </ContentWrap>
      </el-col>
      <el-col :span="rowCol">
        <ContentWrap class="w-1/1"> <LineGraph /> </ContentWrap>
      </el-col>
    </el-row>
    <el-row :gutter="30">
      <el-col :span="rowCol">
        <ContentWrap class="w-1/1"> <CircularDiagram /> </ContentWrap>
      </el-col>
      <el-col :span="rowCol">
        <ContentWrap class="w-1/1"> <PieChart /> </ContentWrap>
      </el-col>
    </el-row>
  </div>
</template>

<style lang="scss" scoped></style>
